﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace SingleBlog
{
    /// <summary>
    /// 匿名用户模型
    /// </summary>
    public class AnonymousUserModel:IValidatableModel
    {
        /// <summary>
        /// 昵称。
        /// </summary>
        [Display(Name="昵称")]
        [Required(ErrorMessage ="{0}不能为空")]
        [StringLength(20,ErrorMessage ="{0}不能超过{1}个字")]
        public string Name { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        [Display(Name = "邮箱")]
        [Required(ErrorMessage = "{0}不能为空")]
        [RegularExpression(Const.PATTERN_EMAIL,ErrorMessage ="{0}格式不正确")]
        public string Email { get; set; }
    }
}
